package im.fsn.messenger;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.text.Spannable;
import android.text.style.ImageSpan;

public class Emoji {
	private static final Spannable.Factory spannableFactory = Spannable.Factory
			.getInstance();

	private static final Map<Pattern, Integer> emoticonStrings = new HashMap<Pattern, Integer>();

	static int getResourceId(int codePoint) {
		switch (codePoint) {
		case 0x00a9:
			return R.drawable.emoji_u00a9;
		case 0x00ae:
			return R.drawable.emoji_u00ae;
		case 0x1f004:
			return R.drawable.emoji_u1f004;
		case 0x1f0cf:
			return R.drawable.emoji_u1f0cf;
		case 0x1f170:
			return R.drawable.emoji_u1f170;
		case 0x1f171:
			return R.drawable.emoji_u1f171;
		case 0x1f17e:
			return R.drawable.emoji_u1f17e;
		case 0x1f17f:
			return R.drawable.emoji_u1f17f;
		case 0x1f18e:
			return R.drawable.emoji_u1f18e;
		case 0x1f191:
			return R.drawable.emoji_u1f191;
		case 0x1f192:
			return R.drawable.emoji_u1f192;
		case 0x1f193:
			return R.drawable.emoji_u1f193;
		case 0x1f194:
			return R.drawable.emoji_u1f194;
		case 0x1f195:
			return R.drawable.emoji_u1f195;
		case 0x1f196:
			return R.drawable.emoji_u1f196;
		case 0x1f197:
			return R.drawable.emoji_u1f197;
		case 0x1f198:
			return R.drawable.emoji_u1f198;
		case 0x1f199:
			return R.drawable.emoji_u1f199;
		case 0x1f19a:
			return R.drawable.emoji_u1f19a;
		case 0x1f1e6:
			return R.drawable.emoji_u1f1e6;
		case 0x1f1e7:
			return R.drawable.emoji_u1f1e7;
		case 0x1f1e8:
			return R.drawable.emoji_u1f1e8;
		case 0x1f1e9:
			return R.drawable.emoji_u1f1e9;
		case 0x1f1ea:
			return R.drawable.emoji_u1f1ea;
		case 0x1f1eb:
			return R.drawable.emoji_u1f1eb;
		case 0x1f1ec:
			return R.drawable.emoji_u1f1ec;
		case 0x1f1ed:
			return R.drawable.emoji_u1f1ed;
		case 0x1f1ee:
			return R.drawable.emoji_u1f1ee;
		case 0x1f1ef:
			return R.drawable.emoji_u1f1ef;
		case 0x1f1f0:
			return R.drawable.emoji_u1f1f0;
		case 0x1f1f1:
			return R.drawable.emoji_u1f1f1;
		case 0x1f1f2:
			return R.drawable.emoji_u1f1f2;
		case 0x1f1f3:
			return R.drawable.emoji_u1f1f3;
		case 0x1f1f4:
			return R.drawable.emoji_u1f1f4;
		case 0x1f1f5:
			return R.drawable.emoji_u1f1f5;
		case 0x1f1f6:
			return R.drawable.emoji_u1f1f6;
		case 0x1f1f7:
			return R.drawable.emoji_u1f1f7;
		case 0x1f1f8:
			return R.drawable.emoji_u1f1f8;
		case 0x1f1f9:
			return R.drawable.emoji_u1f1f9;
		case 0x1f1fa:
			return R.drawable.emoji_u1f1fa;
		case 0x1f1fb:
			return R.drawable.emoji_u1f1fb;
		case 0x1f1fc:
			return R.drawable.emoji_u1f1fc;
		case 0x1f1fd:
			return R.drawable.emoji_u1f1fd;
		case 0x1f1fe:
			return R.drawable.emoji_u1f1fe;
		case 0x1f1ff:
			return R.drawable.emoji_u1f1ff;
		case 0x1f201:
			return R.drawable.emoji_u1f201;
		case 0x1f202:
			return R.drawable.emoji_u1f202;
		case 0x1f21a:
			return R.drawable.emoji_u1f21a;
		case 0x1f22f:
			return R.drawable.emoji_u1f22f;
		case 0x1f232:
			return R.drawable.emoji_u1f232;
		case 0x1f233:
			return R.drawable.emoji_u1f233;
		case 0x1f234:
			return R.drawable.emoji_u1f234;
		case 0x1f235:
			return R.drawable.emoji_u1f235;
		case 0x1f236:
			return R.drawable.emoji_u1f236;
		case 0x1f237:
			return R.drawable.emoji_u1f237;
		case 0x1f238:
			return R.drawable.emoji_u1f238;
		case 0x1f239:
			return R.drawable.emoji_u1f239;
		case 0x1f23a:
			return R.drawable.emoji_u1f23a;
		case 0x1f250:
			return R.drawable.emoji_u1f250;
		case 0x1f251:
			return R.drawable.emoji_u1f251;
		case 0x1f300:
			return R.drawable.emoji_u1f300;
		case 0x1f301:
			return R.drawable.emoji_u1f301;
		case 0x1f302:
			return R.drawable.emoji_u1f302;
		case 0x1f303:
			return R.drawable.emoji_u1f303;
		case 0x1f304:
			return R.drawable.emoji_u1f304;
		case 0x1f305:
			return R.drawable.emoji_u1f305;
		case 0x1f306:
			return R.drawable.emoji_u1f306;
		case 0x1f307:
			return R.drawable.emoji_u1f307;
		case 0x1f308:
			return R.drawable.emoji_u1f308;
		case 0x1f309:
			return R.drawable.emoji_u1f309;
		case 0x1f30a:
			return R.drawable.emoji_u1f30a;
		case 0x1f30b:
			return R.drawable.emoji_u1f30b;
		case 0x1f30c:
			return R.drawable.emoji_u1f30c;
		case 0x1f30d:
			return R.drawable.emoji_u1f30d;
		case 0x1f30e:
			return R.drawable.emoji_u1f30e;
		case 0x1f30f:
			return R.drawable.emoji_u1f30f;
		case 0x1f310:
			return R.drawable.emoji_u1f310;
		case 0x1f311:
			return R.drawable.emoji_u1f311;
		case 0x1f312:
			return R.drawable.emoji_u1f312;
		case 0x1f313:
			return R.drawable.emoji_u1f313;
		case 0x1f314:
			return R.drawable.emoji_u1f314;
		case 0x1f315:
			return R.drawable.emoji_u1f315;
		case 0x1f316:
			return R.drawable.emoji_u1f316;
		case 0x1f317:
			return R.drawable.emoji_u1f317;
		case 0x1f318:
			return R.drawable.emoji_u1f318;
		case 0x1f319:
			return R.drawable.emoji_u1f319;
		case 0x1f31a:
			return R.drawable.emoji_u1f31a;
		case 0x1f31b:
			return R.drawable.emoji_u1f31b;
		case 0x1f31c:
			return R.drawable.emoji_u1f31c;
		case 0x1f31d:
			return R.drawable.emoji_u1f31d;
		case 0x1f31e:
			return R.drawable.emoji_u1f31e;
		case 0x1f31f:
			return R.drawable.emoji_u1f31f;
		case 0x1f320:
			return R.drawable.emoji_u1f320;
		case 0x1f330:
			return R.drawable.emoji_u1f330;
		case 0x1f331:
			return R.drawable.emoji_u1f331;
		case 0x1f332:
			return R.drawable.emoji_u1f332;
		case 0x1f333:
			return R.drawable.emoji_u1f333;
		case 0x1f334:
			return R.drawable.emoji_u1f334;
		case 0x1f335:
			return R.drawable.emoji_u1f335;
		case 0x1f337:
			return R.drawable.emoji_u1f337;
		case 0x1f338:
			return R.drawable.emoji_u1f338;
		case 0x1f339:
			return R.drawable.emoji_u1f339;
		case 0x1f33a:
			return R.drawable.emoji_u1f33a;
		case 0x1f33b:
			return R.drawable.emoji_u1f33b;
		case 0x1f33c:
			return R.drawable.emoji_u1f33c;
		case 0x1f33d:
			return R.drawable.emoji_u1f33d;
		case 0x1f33e:
			return R.drawable.emoji_u1f33e;
		case 0x1f33f:
			return R.drawable.emoji_u1f33f;
		case 0x1f340:
			return R.drawable.emoji_u1f340;
		case 0x1f341:
			return R.drawable.emoji_u1f341;
		case 0x1f342:
			return R.drawable.emoji_u1f342;
		case 0x1f343:
			return R.drawable.emoji_u1f343;
		case 0x1f344:
			return R.drawable.emoji_u1f344;
		case 0x1f345:
			return R.drawable.emoji_u1f345;
		case 0x1f346:
			return R.drawable.emoji_u1f346;
		case 0x1f347:
			return R.drawable.emoji_u1f347;
		case 0x1f348:
			return R.drawable.emoji_u1f348;
		case 0x1f349:
			return R.drawable.emoji_u1f349;
		case 0x1f34a:
			return R.drawable.emoji_u1f34a;
		case 0x1f34b:
			return R.drawable.emoji_u1f34b;
		case 0x1f34c:
			return R.drawable.emoji_u1f34c;
		case 0x1f34d:
			return R.drawable.emoji_u1f34d;
		case 0x1f34e:
			return R.drawable.emoji_u1f34e;
		case 0x1f34f:
			return R.drawable.emoji_u1f34f;
		case 0x1f350:
			return R.drawable.emoji_u1f350;
		case 0x1f351:
			return R.drawable.emoji_u1f351;
		case 0x1f352:
			return R.drawable.emoji_u1f352;
		case 0x1f353:
			return R.drawable.emoji_u1f353;
		case 0x1f354:
			return R.drawable.emoji_u1f354;
		case 0x1f355:
			return R.drawable.emoji_u1f355;
		case 0x1f356:
			return R.drawable.emoji_u1f356;
		case 0x1f357:
			return R.drawable.emoji_u1f357;
		case 0x1f358:
			return R.drawable.emoji_u1f358;
		case 0x1f359:
			return R.drawable.emoji_u1f359;
		case 0x1f35a:
			return R.drawable.emoji_u1f35a;
		case 0x1f35b:
			return R.drawable.emoji_u1f35b;
		case 0x1f35c:
			return R.drawable.emoji_u1f35c;
		case 0x1f35d:
			return R.drawable.emoji_u1f35d;
		case 0x1f35e:
			return R.drawable.emoji_u1f35e;
		case 0x1f35f:
			return R.drawable.emoji_u1f35f;
		case 0x1f360:
			return R.drawable.emoji_u1f360;
		case 0x1f361:
			return R.drawable.emoji_u1f361;
		case 0x1f362:
			return R.drawable.emoji_u1f362;
		case 0x1f363:
			return R.drawable.emoji_u1f363;
		case 0x1f364:
			return R.drawable.emoji_u1f364;
		case 0x1f365:
			return R.drawable.emoji_u1f365;
		case 0x1f366:
			return R.drawable.emoji_u1f366;
		case 0x1f367:
			return R.drawable.emoji_u1f367;
		case 0x1f368:
			return R.drawable.emoji_u1f368;
		case 0x1f369:
			return R.drawable.emoji_u1f369;
		case 0x1f36a:
			return R.drawable.emoji_u1f36a;
		case 0x1f36b:
			return R.drawable.emoji_u1f36b;
		case 0x1f36c:
			return R.drawable.emoji_u1f36c;
		case 0x1f36d:
			return R.drawable.emoji_u1f36d;
		case 0x1f36e:
			return R.drawable.emoji_u1f36e;
		case 0x1f36f:
			return R.drawable.emoji_u1f36f;
		case 0x1f370:
			return R.drawable.emoji_u1f370;
		case 0x1f371:
			return R.drawable.emoji_u1f371;
		case 0x1f372:
			return R.drawable.emoji_u1f372;
		case 0x1f373:
			return R.drawable.emoji_u1f373;
		case 0x1f374:
			return R.drawable.emoji_u1f374;
		case 0x1f375:
			return R.drawable.emoji_u1f375;
		case 0x1f376:
			return R.drawable.emoji_u1f376;
		case 0x1f377:
			return R.drawable.emoji_u1f377;
		case 0x1f378:
			return R.drawable.emoji_u1f378;
		case 0x1f379:
			return R.drawable.emoji_u1f379;
		case 0x1f37a:
			return R.drawable.emoji_u1f37a;
		case 0x1f37b:
			return R.drawable.emoji_u1f37b;
		case 0x1f37c:
			return R.drawable.emoji_u1f37c;
		case 0x1f380:
			return R.drawable.emoji_u1f380;
		case 0x1f381:
			return R.drawable.emoji_u1f381;
		case 0x1f382:
			return R.drawable.emoji_u1f382;
		case 0x1f383:
			return R.drawable.emoji_u1f383;
		case 0x1f384:
			return R.drawable.emoji_u1f384;
		case 0x1f385:
			return R.drawable.emoji_u1f385;
		case 0x1f386:
			return R.drawable.emoji_u1f386;
		case 0x1f387:
			return R.drawable.emoji_u1f387;
		case 0x1f388:
			return R.drawable.emoji_u1f388;
		case 0x1f389:
			return R.drawable.emoji_u1f389;
		case 0x1f38a:
			return R.drawable.emoji_u1f38a;
		case 0x1f38b:
			return R.drawable.emoji_u1f38b;
		case 0x1f38c:
			return R.drawable.emoji_u1f38c;
		case 0x1f38d:
			return R.drawable.emoji_u1f38d;
		case 0x1f38e:
			return R.drawable.emoji_u1f38e;
		case 0x1f38f:
			return R.drawable.emoji_u1f38f;
		case 0x1f390:
			return R.drawable.emoji_u1f390;
		case 0x1f391:
			return R.drawable.emoji_u1f391;
		case 0x1f392:
			return R.drawable.emoji_u1f392;
		case 0x1f393:
			return R.drawable.emoji_u1f393;
		case 0x1f3a0:
			return R.drawable.emoji_u1f3a0;
		case 0x1f3a1:
			return R.drawable.emoji_u1f3a1;
		case 0x1f3a2:
			return R.drawable.emoji_u1f3a2;
		case 0x1f3a3:
			return R.drawable.emoji_u1f3a3;
		case 0x1f3a4:
			return R.drawable.emoji_u1f3a4;
		case 0x1f3a5:
			return R.drawable.emoji_u1f3a5;
		case 0x1f3a6:
			return R.drawable.emoji_u1f3a6;
		case 0x1f3a7:
			return R.drawable.emoji_u1f3a7;
		case 0x1f3a8:
			return R.drawable.emoji_u1f3a8;
		case 0x1f3a9:
			return R.drawable.emoji_u1f3a9;
		case 0x1f3aa:
			return R.drawable.emoji_u1f3aa;
		case 0x1f3ab:
			return R.drawable.emoji_u1f3ab;
		case 0x1f3ac:
			return R.drawable.emoji_u1f3ac;
		case 0x1f3ad:
			return R.drawable.emoji_u1f3ad;
		case 0x1f3ae:
			return R.drawable.emoji_u1f3ae;
		case 0x1f3af:
			return R.drawable.emoji_u1f3af;
		case 0x1f3b0:
			return R.drawable.emoji_u1f3b0;
		case 0x1f3b1:
			return R.drawable.emoji_u1f3b1;
		case 0x1f3b2:
			return R.drawable.emoji_u1f3b2;
		case 0x1f3b3:
			return R.drawable.emoji_u1f3b3;
		case 0x1f3b4:
			return R.drawable.emoji_u1f3b4;
		case 0x1f3b5:
			return R.drawable.emoji_u1f3b5;
		case 0x1f3b6:
			return R.drawable.emoji_u1f3b6;
		case 0x1f3b7:
			return R.drawable.emoji_u1f3b7;
		case 0x1f3b8:
			return R.drawable.emoji_u1f3b8;
		case 0x1f3b9:
			return R.drawable.emoji_u1f3b9;
		case 0x1f3ba:
			return R.drawable.emoji_u1f3ba;
		case 0x1f3bb:
			return R.drawable.emoji_u1f3bb;
		case 0x1f3bc:
			return R.drawable.emoji_u1f3bc;
		case 0x1f3bd:
			return R.drawable.emoji_u1f3bd;
		case 0x1f3be:
			return R.drawable.emoji_u1f3be;
		case 0x1f3bf:
			return R.drawable.emoji_u1f3bf;
		case 0x1f3c0:
			return R.drawable.emoji_u1f3c0;
		case 0x1f3c1:
			return R.drawable.emoji_u1f3c1;
		case 0x1f3c2:
			return R.drawable.emoji_u1f3c2;
		case 0x1f3c3:
			return R.drawable.emoji_u1f3c3;
		case 0x1f3c4:
			return R.drawable.emoji_u1f3c4;
		case 0x1f3c6:
			return R.drawable.emoji_u1f3c6;
		case 0x1f3c7:
			return R.drawable.emoji_u1f3c7;
		case 0x1f3c8:
			return R.drawable.emoji_u1f3c8;
		case 0x1f3c9:
			return R.drawable.emoji_u1f3c9;
		case 0x1f3ca:
			return R.drawable.emoji_u1f3ca;
		case 0x1f3e0:
			return R.drawable.emoji_u1f3e0;
		case 0x1f3e1:
			return R.drawable.emoji_u1f3e1;
		case 0x1f3e2:
			return R.drawable.emoji_u1f3e2;
		case 0x1f3e3:
			return R.drawable.emoji_u1f3e3;
		case 0x1f3e4:
			return R.drawable.emoji_u1f3e4;
		case 0x1f3e5:
			return R.drawable.emoji_u1f3e5;
		case 0x1f3e6:
			return R.drawable.emoji_u1f3e6;
		case 0x1f3e7:
			return R.drawable.emoji_u1f3e7;
		case 0x1f3e8:
			return R.drawable.emoji_u1f3e8;
		case 0x1f3e9:
			return R.drawable.emoji_u1f3e9;
		case 0x1f3ea:
			return R.drawable.emoji_u1f3ea;
		case 0x1f3eb:
			return R.drawable.emoji_u1f3eb;
		case 0x1f3ec:
			return R.drawable.emoji_u1f3ec;
		case 0x1f3ed:
			return R.drawable.emoji_u1f3ed;
		case 0x1f3ee:
			return R.drawable.emoji_u1f3ee;
		case 0x1f3ef:
			return R.drawable.emoji_u1f3ef;
		case 0x1f3f0:
			return R.drawable.emoji_u1f3f0;
		case 0x1f400:
			return R.drawable.emoji_u1f400;
		case 0x1f401:
			return R.drawable.emoji_u1f401;
		case 0x1f402:
			return R.drawable.emoji_u1f402;
		case 0x1f403:
			return R.drawable.emoji_u1f403;
		case 0x1f404:
			return R.drawable.emoji_u1f404;
		case 0x1f405:
			return R.drawable.emoji_u1f405;
		case 0x1f406:
			return R.drawable.emoji_u1f406;
		case 0x1f407:
			return R.drawable.emoji_u1f407;
		case 0x1f408:
			return R.drawable.emoji_u1f408;
		case 0x1f409:
			return R.drawable.emoji_u1f409;
		case 0x1f40a:
			return R.drawable.emoji_u1f40a;
		case 0x1f40b:
			return R.drawable.emoji_u1f40b;
		case 0x1f40c:
			return R.drawable.emoji_u1f40c;
		case 0x1f40d:
			return R.drawable.emoji_u1f40d;
		case 0x1f40e:
			return R.drawable.emoji_u1f40e;
		case 0x1f40f:
			return R.drawable.emoji_u1f40f;
		case 0x1f410:
			return R.drawable.emoji_u1f410;
		case 0x1f411:
			return R.drawable.emoji_u1f411;
		case 0x1f412:
			return R.drawable.emoji_u1f412;
		case 0x1f413:
			return R.drawable.emoji_u1f413;
		case 0x1f414:
			return R.drawable.emoji_u1f414;
		case 0x1f415:
			return R.drawable.emoji_u1f415;
		case 0x1f416:
			return R.drawable.emoji_u1f416;
		case 0x1f417:
			return R.drawable.emoji_u1f417;
		case 0x1f418:
			return R.drawable.emoji_u1f418;
		case 0x1f419:
			return R.drawable.emoji_u1f419;
		case 0x1f41a:
			return R.drawable.emoji_u1f41a;
		case 0x1f41b:
			return R.drawable.emoji_u1f41b;
		case 0x1f41c:
			return R.drawable.emoji_u1f41c;
		case 0x1f41d:
			return R.drawable.emoji_u1f41d;
		case 0x1f41e:
			return R.drawable.emoji_u1f41e;
		case 0x1f41f:
			return R.drawable.emoji_u1f41f;
		case 0x1f420:
			return R.drawable.emoji_u1f420;
		case 0x1f421:
			return R.drawable.emoji_u1f421;
		case 0x1f422:
			return R.drawable.emoji_u1f422;
		case 0x1f423:
			return R.drawable.emoji_u1f423;
		case 0x1f424:
			return R.drawable.emoji_u1f424;
		case 0x1f425:
			return R.drawable.emoji_u1f425;
		case 0x1f426:
			return R.drawable.emoji_u1f426;
		case 0x1f427:
			return R.drawable.emoji_u1f427;
		case 0x1f428:
			return R.drawable.emoji_u1f428;
		case 0x1f429:
			return R.drawable.emoji_u1f429;
		case 0x1f42a:
			return R.drawable.emoji_u1f42a;
		case 0x1f42b:
			return R.drawable.emoji_u1f42b;
		case 0x1f42c:
			return R.drawable.emoji_u1f42c;
		case 0x1f42d:
			return R.drawable.emoji_u1f42d;
		case 0x1f42e:
			return R.drawable.emoji_u1f42e;
		case 0x1f42f:
			return R.drawable.emoji_u1f42f;
		case 0x1f430:
			return R.drawable.emoji_u1f430;
		case 0x1f431:
			return R.drawable.emoji_u1f431;
		case 0x1f432:
			return R.drawable.emoji_u1f432;
		case 0x1f433:
			return R.drawable.emoji_u1f433;
		case 0x1f434:
			return R.drawable.emoji_u1f434;
		case 0x1f435:
			return R.drawable.emoji_u1f435;
		case 0x1f436:
			return R.drawable.emoji_u1f436;
		case 0x1f437:
			return R.drawable.emoji_u1f437;
		case 0x1f438:
			return R.drawable.emoji_u1f438;
		case 0x1f439:
			return R.drawable.emoji_u1f439;
		case 0x1f43a:
			return R.drawable.emoji_u1f43a;
		case 0x1f43b:
			return R.drawable.emoji_u1f43b;
		case 0x1f43c:
			return R.drawable.emoji_u1f43c;
		case 0x1f43d:
			return R.drawable.emoji_u1f43d;
		case 0x1f43e:
			return R.drawable.emoji_u1f43e;
		case 0x1f440:
			return R.drawable.emoji_u1f440;
		case 0x1f442:
			return R.drawable.emoji_u1f442;
		case 0x1f443:
			return R.drawable.emoji_u1f443;
		case 0x1f444:
			return R.drawable.emoji_u1f444;
		case 0x1f445:
			return R.drawable.emoji_u1f445;
		case 0x1f446:
			return R.drawable.emoji_u1f446;
		case 0x1f447:
			return R.drawable.emoji_u1f447;
		case 0x1f448:
			return R.drawable.emoji_u1f448;
		case 0x1f449:
			return R.drawable.emoji_u1f449;
		case 0x1f44a:
			return R.drawable.emoji_u1f44a;
		case 0x1f44b:
			return R.drawable.emoji_u1f44b;
		case 0x1f44c:
			return R.drawable.emoji_u1f44c;
		case 0x1f44d:
			return R.drawable.emoji_u1f44d;
		case 0x1f44e:
			return R.drawable.emoji_u1f44e;
		case 0x1f44f:
			return R.drawable.emoji_u1f44f;
		case 0x1f450:
			return R.drawable.emoji_u1f450;
		case 0x1f451:
			return R.drawable.emoji_u1f451;
		case 0x1f452:
			return R.drawable.emoji_u1f452;
		case 0x1f453:
			return R.drawable.emoji_u1f453;
		case 0x1f454:
			return R.drawable.emoji_u1f454;
		case 0x1f455:
			return R.drawable.emoji_u1f455;
		case 0x1f456:
			return R.drawable.emoji_u1f456;
		case 0x1f457:
			return R.drawable.emoji_u1f457;
		case 0x1f458:
			return R.drawable.emoji_u1f458;
		case 0x1f459:
			return R.drawable.emoji_u1f459;
		case 0x1f45a:
			return R.drawable.emoji_u1f45a;
		case 0x1f45b:
			return R.drawable.emoji_u1f45b;
		case 0x1f45c:
			return R.drawable.emoji_u1f45c;
		case 0x1f45d:
			return R.drawable.emoji_u1f45d;
		case 0x1f45e:
			return R.drawable.emoji_u1f45e;
		case 0x1f45f:
			return R.drawable.emoji_u1f45f;
		case 0x1f460:
			return R.drawable.emoji_u1f460;
		case 0x1f461:
			return R.drawable.emoji_u1f461;
		case 0x1f462:
			return R.drawable.emoji_u1f462;
		case 0x1f463:
			return R.drawable.emoji_u1f463;
		case 0x1f464:
			return R.drawable.emoji_u1f464;
		case 0x1f465:
			return R.drawable.emoji_u1f465;
		case 0x1f466:
			return R.drawable.emoji_u1f466;
		case 0x1f467:
			return R.drawable.emoji_u1f467;
		case 0x1f468:
			return R.drawable.emoji_u1f468;
		case 0x1f469:
			return R.drawable.emoji_u1f469;
		case 0x1f46a:
			return R.drawable.emoji_u1f46a;
		case 0x1f46b:
			return R.drawable.emoji_u1f46b;
		case 0x1f46c:
			return R.drawable.emoji_u1f46c;
		case 0x1f46d:
			return R.drawable.emoji_u1f46d;
		case 0x1f46e:
			return R.drawable.emoji_u1f46e;
		case 0x1f46f:
			return R.drawable.emoji_u1f46f;
		case 0x1f470:
			return R.drawable.emoji_u1f470;
		case 0x1f471:
			return R.drawable.emoji_u1f471;
		case 0x1f472:
			return R.drawable.emoji_u1f472;
		case 0x1f473:
			return R.drawable.emoji_u1f473;
		case 0x1f474:
			return R.drawable.emoji_u1f474;
		case 0x1f475:
			return R.drawable.emoji_u1f475;
		case 0x1f476:
			return R.drawable.emoji_u1f476;
		case 0x1f477:
			return R.drawable.emoji_u1f477;
		case 0x1f478:
			return R.drawable.emoji_u1f478;
		case 0x1f479:
			return R.drawable.emoji_u1f479;
		case 0x1f47a:
			return R.drawable.emoji_u1f47a;
		case 0x1f47b:
			return R.drawable.emoji_u1f47b;
		case 0x1f47c:
			return R.drawable.emoji_u1f47c;
		case 0x1f47d:
			return R.drawable.emoji_u1f47d;
		case 0x1f47e:
			return R.drawable.emoji_u1f47e;
		case 0x1f47f:
			return R.drawable.emoji_u1f47f;
		case 0x1f480:
			return R.drawable.emoji_u1f480;
		case 0x1f481:
			return R.drawable.emoji_u1f481;
		case 0x1f482:
			return R.drawable.emoji_u1f482;
		case 0x1f483:
			return R.drawable.emoji_u1f483;
		case 0x1f484:
			return R.drawable.emoji_u1f484;
		case 0x1f485:
			return R.drawable.emoji_u1f485;
		case 0x1f486:
			return R.drawable.emoji_u1f486;
		case 0x1f487:
			return R.drawable.emoji_u1f487;
		case 0x1f488:
			return R.drawable.emoji_u1f488;
		case 0x1f489:
			return R.drawable.emoji_u1f489;
		case 0x1f48a:
			return R.drawable.emoji_u1f48a;
		case 0x1f48b:
			return R.drawable.emoji_u1f48b;
		case 0x1f48c:
			return R.drawable.emoji_u1f48c;
		case 0x1f48d:
			return R.drawable.emoji_u1f48d;
		case 0x1f48e:
			return R.drawable.emoji_u1f48e;
		case 0x1f48f:
			return R.drawable.emoji_u1f48f;
		case 0x1f490:
			return R.drawable.emoji_u1f490;
		case 0x1f491:
			return R.drawable.emoji_u1f491;
		case 0x1f492:
			return R.drawable.emoji_u1f492;
		case 0x1f493:
			return R.drawable.emoji_u1f493;
		case 0x1f494:
			return R.drawable.emoji_u1f494;
		case 0x1f495:
			return R.drawable.emoji_u1f495;
		case 0x1f496:
			return R.drawable.emoji_u1f496;
		case 0x1f497:
			return R.drawable.emoji_u1f497;
		case 0x1f498:
			return R.drawable.emoji_u1f498;
		case 0x1f499:
			return R.drawable.emoji_u1f499;
		case 0x1f49a:
			return R.drawable.emoji_u1f49a;
		case 0x1f49b:
			return R.drawable.emoji_u1f49b;
		case 0x1f49c:
			return R.drawable.emoji_u1f49c;
		case 0x1f49d:
			return R.drawable.emoji_u1f49d;
		case 0x1f49e:
			return R.drawable.emoji_u1f49e;
		case 0x1f49f:
			return R.drawable.emoji_u1f49f;
		case 0x1f4a0:
			return R.drawable.emoji_u1f4a0;
		case 0x1f4a1:
			return R.drawable.emoji_u1f4a1;
		case 0x1f4a2:
			return R.drawable.emoji_u1f4a2;
		case 0x1f4a3:
			return R.drawable.emoji_u1f4a3;
		case 0x1f4a4:
			return R.drawable.emoji_u1f4a4;
		case 0x1f4a5:
			return R.drawable.emoji_u1f4a5;
		case 0x1f4a6:
			return R.drawable.emoji_u1f4a6;
		case 0x1f4a7:
			return R.drawable.emoji_u1f4a7;
		case 0x1f4a8:
			return R.drawable.emoji_u1f4a8;
		case 0x1f4a9:
			return R.drawable.emoji_u1f4a9;
		case 0x1f4aa:
			return R.drawable.emoji_u1f4aa;
		case 0x1f4ab:
			return R.drawable.emoji_u1f4ab;
		case 0x1f4ac:
			return R.drawable.emoji_u1f4ac;
		case 0x1f4ad:
			return R.drawable.emoji_u1f4ad;
		case 0x1f4ae:
			return R.drawable.emoji_u1f4ae;
		case 0x1f4af:
			return R.drawable.emoji_u1f4af;
		case 0x1f4b0:
			return R.drawable.emoji_u1f4b0;
		case 0x1f4b1:
			return R.drawable.emoji_u1f4b1;
		case 0x1f4b2:
			return R.drawable.emoji_u1f4b2;
		case 0x1f4b3:
			return R.drawable.emoji_u1f4b3;
		case 0x1f4b4:
			return R.drawable.emoji_u1f4b4;
		case 0x1f4b5:
			return R.drawable.emoji_u1f4b5;
		case 0x1f4b6:
			return R.drawable.emoji_u1f4b6;
		case 0x1f4b7:
			return R.drawable.emoji_u1f4b7;
		case 0x1f4b8:
			return R.drawable.emoji_u1f4b8;
		case 0x1f4b9:
			return R.drawable.emoji_u1f4b9;
		case 0x1f4ba:
			return R.drawable.emoji_u1f4ba;
		case 0x1f4bb:
			return R.drawable.emoji_u1f4bb;
		case 0x1f4bc:
			return R.drawable.emoji_u1f4bc;
		case 0x1f4bd:
			return R.drawable.emoji_u1f4bd;
		case 0x1f4be:
			return R.drawable.emoji_u1f4be;
		case 0x1f4bf:
			return R.drawable.emoji_u1f4bf;
		case 0x1f4c0:
			return R.drawable.emoji_u1f4c0;
		case 0x1f4c1:
			return R.drawable.emoji_u1f4c1;
		case 0x1f4c2:
			return R.drawable.emoji_u1f4c2;
		case 0x1f4c3:
			return R.drawable.emoji_u1f4c3;
		case 0x1f4c4:
			return R.drawable.emoji_u1f4c4;
		case 0x1f4c5:
			return R.drawable.emoji_u1f4c5;
		case 0x1f4c6:
			return R.drawable.emoji_u1f4c6;
		case 0x1f4c7:
			return R.drawable.emoji_u1f4c7;
		case 0x1f4c8:
			return R.drawable.emoji_u1f4c8;
		case 0x1f4c9:
			return R.drawable.emoji_u1f4c9;
		case 0x1f4ca:
			return R.drawable.emoji_u1f4ca;
		case 0x1f4cb:
			return R.drawable.emoji_u1f4cb;
		case 0x1f4cc:
			return R.drawable.emoji_u1f4cc;
		case 0x1f4cd:
			return R.drawable.emoji_u1f4cd;
		case 0x1f4ce:
			return R.drawable.emoji_u1f4ce;
		case 0x1f4cf:
			return R.drawable.emoji_u1f4cf;
		case 0x1f4d0:
			return R.drawable.emoji_u1f4d0;
		case 0x1f4d1:
			return R.drawable.emoji_u1f4d1;
		case 0x1f4d2:
			return R.drawable.emoji_u1f4d2;
		case 0x1f4d3:
			return R.drawable.emoji_u1f4d3;
		case 0x1f4d4:
			return R.drawable.emoji_u1f4d4;
		case 0x1f4d5:
			return R.drawable.emoji_u1f4d5;
		case 0x1f4d6:
			return R.drawable.emoji_u1f4d6;
		case 0x1f4d7:
			return R.drawable.emoji_u1f4d7;
		case 0x1f4d8:
			return R.drawable.emoji_u1f4d8;
		case 0x1f4d9:
			return R.drawable.emoji_u1f4d9;
		case 0x1f4da:
			return R.drawable.emoji_u1f4da;
		case 0x1f4db:
			return R.drawable.emoji_u1f4db;
		case 0x1f4dc:
			return R.drawable.emoji_u1f4dc;
		case 0x1f4dd:
			return R.drawable.emoji_u1f4dd;
		case 0x1f4de:
			return R.drawable.emoji_u1f4de;
		case 0x1f4df:
			return R.drawable.emoji_u1f4df;
		case 0x1f4e0:
			return R.drawable.emoji_u1f4e0;
		case 0x1f4e1:
			return R.drawable.emoji_u1f4e1;
		case 0x1f4e2:
			return R.drawable.emoji_u1f4e2;
		case 0x1f4e3:
			return R.drawable.emoji_u1f4e3;
		case 0x1f4e4:
			return R.drawable.emoji_u1f4e4;
		case 0x1f4e5:
			return R.drawable.emoji_u1f4e5;
		case 0x1f4e6:
			return R.drawable.emoji_u1f4e6;
		case 0x1f4e7:
			return R.drawable.emoji_u1f4e7;
		case 0x1f4e8:
			return R.drawable.emoji_u1f4e8;
		case 0x1f4e9:
			return R.drawable.emoji_u1f4e9;
		case 0x1f4ea:
			return R.drawable.emoji_u1f4ea;
		case 0x1f4eb:
			return R.drawable.emoji_u1f4eb;
		case 0x1f4ec:
			return R.drawable.emoji_u1f4ec;
		case 0x1f4ed:
			return R.drawable.emoji_u1f4ed;
		case 0x1f4ee:
			return R.drawable.emoji_u1f4ee;
		case 0x1f4ef:
			return R.drawable.emoji_u1f4ef;
		case 0x1f4f0:
			return R.drawable.emoji_u1f4f0;
		case 0x1f4f1:
			return R.drawable.emoji_u1f4f1;
		case 0x1f4f2:
			return R.drawable.emoji_u1f4f2;
		case 0x1f4f3:
			return R.drawable.emoji_u1f4f3;
		case 0x1f4f4:
			return R.drawable.emoji_u1f4f4;
		case 0x1f4f5:
			return R.drawable.emoji_u1f4f5;
		case 0x1f4f6:
			return R.drawable.emoji_u1f4f6;
		case 0x1f4f7:
			return R.drawable.emoji_u1f4f7;
		case 0x1f4f9:
			return R.drawable.emoji_u1f4f9;
		case 0x1f4fa:
			return R.drawable.emoji_u1f4fa;
		case 0x1f4fb:
			return R.drawable.emoji_u1f4fb;
		case 0x1f4fc:
			return R.drawable.emoji_u1f4fc;
		case 0x1f500:
			return R.drawable.emoji_u1f500;
		case 0x1f501:
			return R.drawable.emoji_u1f501;
		case 0x1f502:
			return R.drawable.emoji_u1f502;
		case 0x1f503:
			return R.drawable.emoji_u1f503;
		case 0x1f504:
			return R.drawable.emoji_u1f504;
		case 0x1f505:
			return R.drawable.emoji_u1f505;
		case 0x1f506:
			return R.drawable.emoji_u1f506;
		case 0x1f507:
			return R.drawable.emoji_u1f507;
		case 0x1f508:
			return R.drawable.emoji_u1f508;
		case 0x1f509:
			return R.drawable.emoji_u1f509;
		case 0x1f50a:
			return R.drawable.emoji_u1f50a;
		case 0x1f50b:
			return R.drawable.emoji_u1f50b;
		case 0x1f50c:
			return R.drawable.emoji_u1f50c;
		case 0x1f50d:
			return R.drawable.emoji_u1f50d;
		case 0x1f50e:
			return R.drawable.emoji_u1f50e;
		case 0x1f50f:
			return R.drawable.emoji_u1f50f;
		case 0x1f510:
			return R.drawable.emoji_u1f510;
		case 0x1f511:
			return R.drawable.emoji_u1f511;
		case 0x1f512:
			return R.drawable.emoji_u1f512;
		case 0x1f513:
			return R.drawable.emoji_u1f513;
		case 0x1f514:
			return R.drawable.emoji_u1f514;
		case 0x1f515:
			return R.drawable.emoji_u1f515;
		case 0x1f516:
			return R.drawable.emoji_u1f516;
		case 0x1f517:
			return R.drawable.emoji_u1f517;
		case 0x1f518:
			return R.drawable.emoji_u1f518;
		case 0x1f519:
			return R.drawable.emoji_u1f519;
		case 0x1f51a:
			return R.drawable.emoji_u1f51a;
		case 0x1f51b:
			return R.drawable.emoji_u1f51b;
		case 0x1f51c:
			return R.drawable.emoji_u1f51c;
		case 0x1f51d:
			return R.drawable.emoji_u1f51d;
		case 0x1f51e:
			return R.drawable.emoji_u1f51e;
		case 0x1f51f:
			return R.drawable.emoji_u1f51f;
		case 0x1f520:
			return R.drawable.emoji_u1f520;
		case 0x1f521:
			return R.drawable.emoji_u1f521;
		case 0x1f522:
			return R.drawable.emoji_u1f522;
		case 0x1f523:
			return R.drawable.emoji_u1f523;
		case 0x1f524:
			return R.drawable.emoji_u1f524;
		case 0x1f525:
			return R.drawable.emoji_u1f525;
		case 0x1f526:
			return R.drawable.emoji_u1f526;
		case 0x1f527:
			return R.drawable.emoji_u1f527;
		case 0x1f528:
			return R.drawable.emoji_u1f528;
		case 0x1f529:
			return R.drawable.emoji_u1f529;
		case 0x1f52a:
			return R.drawable.emoji_u1f52a;
		case 0x1f52b:
			return R.drawable.emoji_u1f52b;
		case 0x1f52c:
			return R.drawable.emoji_u1f52c;
		case 0x1f52d:
			return R.drawable.emoji_u1f52d;
		case 0x1f52e:
			return R.drawable.emoji_u1f52e;
		case 0x1f52f:
			return R.drawable.emoji_u1f52f;
		case 0x1f530:
			return R.drawable.emoji_u1f530;
		case 0x1f531:
			return R.drawable.emoji_u1f531;
		case 0x1f532:
			return R.drawable.emoji_u1f532;
		case 0x1f533:
			return R.drawable.emoji_u1f533;
		case 0x1f534:
			return R.drawable.emoji_u1f534;
		case 0x1f535:
			return R.drawable.emoji_u1f535;
		case 0x1f536:
			return R.drawable.emoji_u1f536;
		case 0x1f537:
			return R.drawable.emoji_u1f537;
		case 0x1f538:
			return R.drawable.emoji_u1f538;
		case 0x1f539:
			return R.drawable.emoji_u1f539;
		case 0x1f53a:
			return R.drawable.emoji_u1f53a;
		case 0x1f53b:
			return R.drawable.emoji_u1f53b;
		case 0x1f53c:
			return R.drawable.emoji_u1f53c;
		case 0x1f53d:
			return R.drawable.emoji_u1f53d;
		case 0x1f550:
			return R.drawable.emoji_u1f550;
		case 0x1f551:
			return R.drawable.emoji_u1f551;
		case 0x1f552:
			return R.drawable.emoji_u1f552;
		case 0x1f553:
			return R.drawable.emoji_u1f553;
		case 0x1f554:
			return R.drawable.emoji_u1f554;
		case 0x1f555:
			return R.drawable.emoji_u1f555;
		case 0x1f556:
			return R.drawable.emoji_u1f556;
		case 0x1f557:
			return R.drawable.emoji_u1f557;
		case 0x1f558:
			return R.drawable.emoji_u1f558;
		case 0x1f559:
			return R.drawable.emoji_u1f559;
		case 0x1f55a:
			return R.drawable.emoji_u1f55a;
		case 0x1f55b:
			return R.drawable.emoji_u1f55b;
		case 0x1f55c:
			return R.drawable.emoji_u1f55c;
		case 0x1f55d:
			return R.drawable.emoji_u1f55d;
		case 0x1f55e:
			return R.drawable.emoji_u1f55e;
		case 0x1f55f:
			return R.drawable.emoji_u1f55f;
		case 0x1f560:
			return R.drawable.emoji_u1f560;
		case 0x1f561:
			return R.drawable.emoji_u1f561;
		case 0x1f562:
			return R.drawable.emoji_u1f562;
		case 0x1f563:
			return R.drawable.emoji_u1f563;
		case 0x1f564:
			return R.drawable.emoji_u1f564;
		case 0x1f565:
			return R.drawable.emoji_u1f565;
		case 0x1f566:
			return R.drawable.emoji_u1f566;
		case 0x1f567:
			return R.drawable.emoji_u1f567;
		case 0x1f5fb:
			return R.drawable.emoji_u1f5fb;
		case 0x1f5fc:
			return R.drawable.emoji_u1f5fc;
		case 0x1f5fd:
			return R.drawable.emoji_u1f5fd;
		case 0x1f5fe:
			return R.drawable.emoji_u1f5fe;
		case 0x1f5ff:
			return R.drawable.emoji_u1f5ff;
		case 0x1f600:
			return R.drawable.emoji_u1f600;
		case 0x1f601:
			return R.drawable.emoji_u1f601;
		case 0x1f602:
			return R.drawable.emoji_u1f602;
		case 0x1f603:
			return R.drawable.emoji_u1f603;
		case 0x1f604:
			return R.drawable.emoji_u1f604;
		case 0x1f605:
			return R.drawable.emoji_u1f605;
		case 0x1f606:
			return R.drawable.emoji_u1f606;
		case 0x1f607:
			return R.drawable.emoji_u1f607;
		case 0x1f608:
			return R.drawable.emoji_u1f608;
		case 0x1f609:
			return R.drawable.emoji_u1f609;
		case 0x1f60a:
			return R.drawable.emoji_u1f60a;
		case 0x1f60b:
			return R.drawable.emoji_u1f60b;
		case 0x1f60c:
			return R.drawable.emoji_u1f60c;
		case 0x1f60d:
			return R.drawable.emoji_u1f60d;
		case 0x1f60e:
			return R.drawable.emoji_u1f60e;
		case 0x1f60f:
			return R.drawable.emoji_u1f60f;
		case 0x1f610:
			return R.drawable.emoji_u1f610;
		case 0x1f611:
			return R.drawable.emoji_u1f611;
		case 0x1f612:
			return R.drawable.emoji_u1f612;
		case 0x1f613:
			return R.drawable.emoji_u1f613;
		case 0x1f614:
			return R.drawable.emoji_u1f614;
		case 0x1f615:
			return R.drawable.emoji_u1f615;
		case 0x1f616:
			return R.drawable.emoji_u1f616;
		case 0x1f617:
			return R.drawable.emoji_u1f617;
		case 0x1f618:
			return R.drawable.emoji_u1f618;
		case 0x1f619:
			return R.drawable.emoji_u1f619;
		case 0x1f61a:
			return R.drawable.emoji_u1f61a;
		case 0x1f61b:
			return R.drawable.emoji_u1f61b;
		case 0x1f61c:
			return R.drawable.emoji_u1f61c;
		case 0x1f61d:
			return R.drawable.emoji_u1f61d;
		case 0x1f61e:
			return R.drawable.emoji_u1f61e;
		case 0x1f61f:
			return R.drawable.emoji_u1f61f;
		case 0x1f620:
			return R.drawable.emoji_u1f620;
		case 0x1f621:
			return R.drawable.emoji_u1f621;
		case 0x1f622:
			return R.drawable.emoji_u1f622;
		case 0x1f623:
			return R.drawable.emoji_u1f623;
		case 0x1f624:
			return R.drawable.emoji_u1f624;
		case 0x1f625:
			return R.drawable.emoji_u1f625;
		case 0x1f626:
			return R.drawable.emoji_u1f626;
		case 0x1f627:
			return R.drawable.emoji_u1f627;
		case 0x1f628:
			return R.drawable.emoji_u1f628;
		case 0x1f629:
			return R.drawable.emoji_u1f629;
		case 0x1f62a:
			return R.drawable.emoji_u1f62a;
		case 0x1f62b:
			return R.drawable.emoji_u1f62b;
		case 0x1f62c:
			return R.drawable.emoji_u1f62c;
		case 0x1f62d:
			return R.drawable.emoji_u1f62d;
		case 0x1f62e:
			return R.drawable.emoji_u1f62e;
		case 0x1f62f:
			return R.drawable.emoji_u1f62f;
		case 0x1f630:
			return R.drawable.emoji_u1f630;
		case 0x1f631:
			return R.drawable.emoji_u1f631;
		case 0x1f632:
			return R.drawable.emoji_u1f632;
		case 0x1f633:
			return R.drawable.emoji_u1f633;
		case 0x1f634:
			return R.drawable.emoji_u1f634;
		case 0x1f635:
			return R.drawable.emoji_u1f635;
		case 0x1f636:
			return R.drawable.emoji_u1f636;
		case 0x1f637:
			return R.drawable.emoji_u1f637;
		case 0x1f638:
			return R.drawable.emoji_u1f638;
		case 0x1f639:
			return R.drawable.emoji_u1f639;
		case 0x1f63a:
			return R.drawable.emoji_u1f63a;
		case 0x1f63b:
			return R.drawable.emoji_u1f63b;
		case 0x1f63c:
			return R.drawable.emoji_u1f63c;
		case 0x1f63d:
			return R.drawable.emoji_u1f63d;
		case 0x1f63e:
			return R.drawable.emoji_u1f63e;
		case 0x1f63f:
			return R.drawable.emoji_u1f63f;
		case 0x1f640:
			return R.drawable.emoji_u1f640;
		case 0x1f645:
			return R.drawable.emoji_u1f645;
		case 0x1f646:
			return R.drawable.emoji_u1f646;
		case 0x1f647:
			return R.drawable.emoji_u1f647;
		case 0x1f648:
			return R.drawable.emoji_u1f648;
		case 0x1f649:
			return R.drawable.emoji_u1f649;
		case 0x1f64a:
			return R.drawable.emoji_u1f64a;
		case 0x1f64b:
			return R.drawable.emoji_u1f64b;
		case 0x1f64c:
			return R.drawable.emoji_u1f64c;
		case 0x1f64d:
			return R.drawable.emoji_u1f64d;
		case 0x1f64e:
			return R.drawable.emoji_u1f64e;
		case 0x1f64f:
			return R.drawable.emoji_u1f64f;
		case 0x1f680:
			return R.drawable.emoji_u1f680;
		case 0x1f681:
			return R.drawable.emoji_u1f681;
		case 0x1f682:
			return R.drawable.emoji_u1f682;
		case 0x1f683:
			return R.drawable.emoji_u1f683;
		case 0x1f684:
			return R.drawable.emoji_u1f684;
		case 0x1f685:
			return R.drawable.emoji_u1f685;
		case 0x1f686:
			return R.drawable.emoji_u1f686;
		case 0x1f687:
			return R.drawable.emoji_u1f687;
		case 0x1f688:
			return R.drawable.emoji_u1f688;
		case 0x1f689:
			return R.drawable.emoji_u1f689;
		case 0x1f68a:
			return R.drawable.emoji_u1f68a;
		case 0x1f68b:
			return R.drawable.emoji_u1f68b;
		case 0x1f68c:
			return R.drawable.emoji_u1f68c;
		case 0x1f68d:
			return R.drawable.emoji_u1f68d;
		case 0x1f68e:
			return R.drawable.emoji_u1f68e;
		case 0x1f68f:
			return R.drawable.emoji_u1f68f;
		case 0x1f690:
			return R.drawable.emoji_u1f690;
		case 0x1f691:
			return R.drawable.emoji_u1f691;
		case 0x1f692:
			return R.drawable.emoji_u1f692;
		case 0x1f693:
			return R.drawable.emoji_u1f693;
		case 0x1f694:
			return R.drawable.emoji_u1f694;
		case 0x1f695:
			return R.drawable.emoji_u1f695;
		case 0x1f696:
			return R.drawable.emoji_u1f696;
		case 0x1f697:
			return R.drawable.emoji_u1f697;
		case 0x1f698:
			return R.drawable.emoji_u1f698;
		case 0x1f699:
			return R.drawable.emoji_u1f699;
		case 0x1f69a:
			return R.drawable.emoji_u1f69a;
		case 0x1f69b:
			return R.drawable.emoji_u1f69b;
		case 0x1f69c:
			return R.drawable.emoji_u1f69c;
		case 0x1f69d:
			return R.drawable.emoji_u1f69d;
		case 0x1f69e:
			return R.drawable.emoji_u1f69e;
		case 0x1f69f:
			return R.drawable.emoji_u1f69f;
		case 0x1f6a0:
			return R.drawable.emoji_u1f6a0;
		case 0x1f6a1:
			return R.drawable.emoji_u1f6a1;
		case 0x1f6a2:
			return R.drawable.emoji_u1f6a2;
		case 0x1f6a3:
			return R.drawable.emoji_u1f6a3;
		case 0x1f6a4:
			return R.drawable.emoji_u1f6a4;
		case 0x1f6a5:
			return R.drawable.emoji_u1f6a5;
		case 0x1f6a6:
			return R.drawable.emoji_u1f6a6;
		case 0x1f6a7:
			return R.drawable.emoji_u1f6a7;
		case 0x1f6a8:
			return R.drawable.emoji_u1f6a8;
		case 0x1f6a9:
			return R.drawable.emoji_u1f6a9;
		case 0x1f6aa:
			return R.drawable.emoji_u1f6aa;
		case 0x1f6ab:
			return R.drawable.emoji_u1f6ab;
		case 0x1f6ac:
			return R.drawable.emoji_u1f6ac;
		case 0x1f6ad:
			return R.drawable.emoji_u1f6ad;
		case 0x1f6ae:
			return R.drawable.emoji_u1f6ae;
		case 0x1f6af:
			return R.drawable.emoji_u1f6af;
		case 0x1f6b0:
			return R.drawable.emoji_u1f6b0;
		case 0x1f6b1:
			return R.drawable.emoji_u1f6b1;
		case 0x1f6b2:
			return R.drawable.emoji_u1f6b2;
		case 0x1f6b3:
			return R.drawable.emoji_u1f6b3;
		case 0x1f6b4:
			return R.drawable.emoji_u1f6b4;
		case 0x1f6b5:
			return R.drawable.emoji_u1f6b5;
		case 0x1f6b6:
			return R.drawable.emoji_u1f6b6;
		case 0x1f6b7:
			return R.drawable.emoji_u1f6b7;
		case 0x1f6b8:
			return R.drawable.emoji_u1f6b8;
		case 0x1f6b9:
			return R.drawable.emoji_u1f6b9;
		case 0x1f6ba:
			return R.drawable.emoji_u1f6ba;
		case 0x1f6bb:
			return R.drawable.emoji_u1f6bb;
		case 0x1f6bc:
			return R.drawable.emoji_u1f6bc;
		case 0x1f6bd:
			return R.drawable.emoji_u1f6bd;
		case 0x1f6be:
			return R.drawable.emoji_u1f6be;
		case 0x1f6bf:
			return R.drawable.emoji_u1f6bf;
		case 0x1f6c0:
			return R.drawable.emoji_u1f6c0;
		case 0x1f6c1:
			return R.drawable.emoji_u1f6c1;
		case 0x1f6c2:
			return R.drawable.emoji_u1f6c2;
		case 0x1f6c3:
			return R.drawable.emoji_u1f6c3;
		case 0x1f6c4:
			return R.drawable.emoji_u1f6c4;
		case 0x1f6c5:
			return R.drawable.emoji_u1f6c5;
		case 0x2002:
			return R.drawable.emoji_u2002;
		case 0x2003:
			return R.drawable.emoji_u2003;
		case 0x2005:
			return R.drawable.emoji_u2005;
		case 0x203c:
			return R.drawable.emoji_u203c;
		case 0x2049:
			return R.drawable.emoji_u2049;
		case 0x20e3:
			return R.drawable.emoji_u20e3;
		case 0x2122:
			return R.drawable.emoji_u2122;
		case 0x2139:
			return R.drawable.emoji_u2139;
		case 0x2194:
			return R.drawable.emoji_u2194;
		case 0x2195:
			return R.drawable.emoji_u2195;
		case 0x2196:
			return R.drawable.emoji_u2196;
		case 0x2197:
			return R.drawable.emoji_u2197;
		case 0x2198:
			return R.drawable.emoji_u2198;
		case 0x2199:
			return R.drawable.emoji_u2199;
		case 0x21a9:
			return R.drawable.emoji_u21a9;
		case 0x21aa:
			return R.drawable.emoji_u21aa;
		case 0x231a:
			return R.drawable.emoji_u231a;
		case 0x231b:
			return R.drawable.emoji_u231b;
		case 0x23e9:
			return R.drawable.emoji_u23e9;
		case 0x23ea:
			return R.drawable.emoji_u23ea;
		case 0x23eb:
			return R.drawable.emoji_u23eb;
		case 0x23ec:
			return R.drawable.emoji_u23ec;
		case 0x23f0:
			return R.drawable.emoji_u23f0;
		case 0x23f3:
			return R.drawable.emoji_u23f3;
		case 0x24c2:
			return R.drawable.emoji_u24c2;
		case 0x25aa:
			return R.drawable.emoji_u25aa;
		case 0x25ab:
			return R.drawable.emoji_u25ab;
		case 0x25b6:
			return R.drawable.emoji_u25b6;
		case 0x25c0:
			return R.drawable.emoji_u25c0;
		case 0x25fb:
			return R.drawable.emoji_u25fb;
		case 0x25fc:
			return R.drawable.emoji_u25fc;
		case 0x25fd:
			return R.drawable.emoji_u25fd;
		case 0x25fe:
			return R.drawable.emoji_u25fe;
		case 0x2600:
			return R.drawable.emoji_u2600;
		case 0x2601:
			return R.drawable.emoji_u2601;
		case 0x260e:
			return R.drawable.emoji_u260e;
		case 0x2611:
			return R.drawable.emoji_u2611;
		case 0x2614:
			return R.drawable.emoji_u2614;
		case 0x2615:
			return R.drawable.emoji_u2615;
		case 0x261d:
			return R.drawable.emoji_u261d;
		case 0x263a:
			return R.drawable.emoji_u263a;
		case 0x2648:
			return R.drawable.emoji_u2648;
		case 0x2649:
			return R.drawable.emoji_u2649;
		case 0x264a:
			return R.drawable.emoji_u264a;
		case 0x264b:
			return R.drawable.emoji_u264b;
		case 0x264c:
			return R.drawable.emoji_u264c;
		case 0x264d:
			return R.drawable.emoji_u264d;
		case 0x264e:
			return R.drawable.emoji_u264e;
		case 0x264f:
			return R.drawable.emoji_u264f;
		case 0x2650:
			return R.drawable.emoji_u2650;
		case 0x2651:
			return R.drawable.emoji_u2651;
		case 0x2652:
			return R.drawable.emoji_u2652;
		case 0x2653:
			return R.drawable.emoji_u2653;
		case 0x2660:
			return R.drawable.emoji_u2660;
		case 0x2663:
			return R.drawable.emoji_u2663;
		case 0x2665:
			return R.drawable.emoji_u2665;
		case 0x2666:
			return R.drawable.emoji_u2666;
		case 0x2668:
			return R.drawable.emoji_u2668;
		case 0x267b:
			return R.drawable.emoji_u267b;
		case 0x267f:
			return R.drawable.emoji_u267f;
		case 0x2693:
			return R.drawable.emoji_u2693;
		case 0x26a0:
			return R.drawable.emoji_u26a0;
		case 0x26a1:
			return R.drawable.emoji_u26a1;
		case 0x26aa:
			return R.drawable.emoji_u26aa;
		case 0x26ab:
			return R.drawable.emoji_u26ab;
		case 0x26bd:
			return R.drawable.emoji_u26bd;
		case 0x26be:
			return R.drawable.emoji_u26be;
		case 0x26c4:
			return R.drawable.emoji_u26c4;
		case 0x26c5:
			return R.drawable.emoji_u26c5;
		case 0x26ce:
			return R.drawable.emoji_u26ce;
		case 0x26d4:
			return R.drawable.emoji_u26d4;
		case 0x26ea:
			return R.drawable.emoji_u26ea;
		case 0x26f2:
			return R.drawable.emoji_u26f2;
		case 0x26f3:
			return R.drawable.emoji_u26f3;
		case 0x26f5:
			return R.drawable.emoji_u26f5;
		case 0x26fa:
			return R.drawable.emoji_u26fa;
		case 0x26fd:
			return R.drawable.emoji_u26fd;
		case 0x2702:
			return R.drawable.emoji_u2702;
		case 0x2705:
			return R.drawable.emoji_u2705;
		case 0x2708:
			return R.drawable.emoji_u2708;
		case 0x2709:
			return R.drawable.emoji_u2709;
		case 0x270a:
			return R.drawable.emoji_u270a;
		case 0x270b:
			return R.drawable.emoji_u270b;
		case 0x270c:
			return R.drawable.emoji_u270c;
		case 0x270f:
			return R.drawable.emoji_u270f;
		case 0x2712:
			return R.drawable.emoji_u2712;
		case 0x2714:
			return R.drawable.emoji_u2714;
		case 0x2716:
			return R.drawable.emoji_u2716;
		case 0x2728:
			return R.drawable.emoji_u2728;
		case 0x2733:
			return R.drawable.emoji_u2733;
		case 0x2734:
			return R.drawable.emoji_u2734;
		case 0x2744:
			return R.drawable.emoji_u2744;
		case 0x2747:
			return R.drawable.emoji_u2747;
		case 0x274c:
			return R.drawable.emoji_u274c;
		case 0x274e:
			return R.drawable.emoji_u274e;
		case 0x2753:
			return R.drawable.emoji_u2753;
		case 0x2754:
			return R.drawable.emoji_u2754;
		case 0x2755:
			return R.drawable.emoji_u2755;
		case 0x2757:
			return R.drawable.emoji_u2757;
		case 0x2762:
			return R.drawable.emoji_u2762;
		case 0x2764:
			return R.drawable.emoji_u2764;
		case 0x2795:
			return R.drawable.emoji_u2795;
		case 0x2796:
			return R.drawable.emoji_u2796;
		case 0x2797:
			return R.drawable.emoji_u2797;
		case 0x27a1:
			return R.drawable.emoji_u27a1;
		case 0x27b0:
			return R.drawable.emoji_u27b0;
		case 0x27bf:
			return R.drawable.emoji_u27bf;
		case 0x2934:
			return R.drawable.emoji_u2934;
		case 0x2935:
			return R.drawable.emoji_u2935;
		case 0x2b05:
			return R.drawable.emoji_u2b05;
		case 0x2b06:
			return R.drawable.emoji_u2b06;
		case 0x2b07:
			return R.drawable.emoji_u2b07;
		case 0x2b1b:
			return R.drawable.emoji_u2b1b;
		case 0x2b1c:
			return R.drawable.emoji_u2b1c;
		case 0x2b50:
			return R.drawable.emoji_u2b50;
		case 0x2b55:
			return R.drawable.emoji_u2b55;
		case 0x3030:
			return R.drawable.emoji_u3030;
		case 0x303d:
			return R.drawable.emoji_u303d;
		case 0x3297:
			return R.drawable.emoji_u3297;
		case 0x3299:
			return R.drawable.emoji_u3299;
		case 0xfe4e5:
			return R.drawable.emoji_ufe4e5;
		case 0xfe4e6:
			return R.drawable.emoji_ufe4e6;
		case 0xfe4e7:
			return R.drawable.emoji_ufe4e7;
		case 0xfe4e8:
			return R.drawable.emoji_ufe4e8;
		case 0xfe4e9:
			return R.drawable.emoji_ufe4e9;
		case 0xfe4ea:
			return R.drawable.emoji_ufe4ea;
		case 0xfe4eb:
			return R.drawable.emoji_ufe4eb;
		case 0xfe4ec:
			return R.drawable.emoji_ufe4ec;
		case 0xfe4ed:
			return R.drawable.emoji_ufe4ed;
		case 0xfe4ee:
			return R.drawable.emoji_ufe4ee;
		case 0xfe82c:
			return R.drawable.emoji_ufe82c;
		case 0xfe82e:
			return R.drawable.emoji_ufe82e;
		case 0xfe82f:
			return R.drawable.emoji_ufe82f;
		case 0xfe830:
			return R.drawable.emoji_ufe830;
		case 0xfe831:
			return R.drawable.emoji_ufe831;
		case 0xfe832:
			return R.drawable.emoji_ufe832;
		case 0xfe833:
			return R.drawable.emoji_ufe833;
		case 0xfe834:
			return R.drawable.emoji_ufe834;
		case 0xfe835:
			return R.drawable.emoji_ufe835;
		case 0xfe836:
			return R.drawable.emoji_ufe836;
		case 0xfe837:
			return R.drawable.emoji_ufe837;
		}
		return 0;

	}

	static {
		addPattern(emoticonStrings, ":-)", R.drawable.emo_im_happy);
		addPattern(emoticonStrings, ":-(", R.drawable.emo_im_sad);
		addPattern(emoticonStrings, ";-)", R.drawable.emo_im_winking);
		addPattern(emoticonStrings, ":-P",
				R.drawable.emo_im_tongue_sticking_out);
		addPattern(emoticonStrings, "=-O", R.drawable.emo_im_surprised);
		addPattern(emoticonStrings, ":-*", R.drawable.emo_im_kissing);
		addPattern(emoticonStrings, ":O", R.drawable.emo_im_yelling);
		addPattern(emoticonStrings, "B-)", R.drawable.emo_im_cool);
		addPattern(emoticonStrings, ":-$", R.drawable.emo_im_money_mouth);
		addPattern(emoticonStrings, ":-!", R.drawable.emo_im_foot_in_mouth);
		addPattern(emoticonStrings, ":-[", R.drawable.emo_im_embarrassed);
		addPattern(emoticonStrings, "O:-)", R.drawable.emo_im_angel);
		addPattern(emoticonStrings, ":-\\", R.drawable.emo_im_undecided);
		addPattern(emoticonStrings, ":'(", R.drawable.emo_im_crying);
		addPattern(emoticonStrings, ":-X", R.drawable.emo_im_lips_are_sealed);
		addPattern(emoticonStrings, ":-D", R.drawable.emo_im_laughing);
		addPattern(emoticonStrings, "o_O", R.drawable.emo_im_wtf);
		addPattern(emoticonStrings, "<3", R.drawable.emo_im_heart);
		addPattern(emoticonStrings, "x-(", R.drawable.emo_im_mad);
		addPattern(emoticonStrings, ":-/", R.drawable.emo_im_smirk);
		addPattern(emoticonStrings, ":-|", R.drawable.emo_im_pokerface);

	}

	private static void addPattern(Map<Pattern, Integer> map, String smile,
			int resource) {
		map.put(Pattern.compile(Pattern.quote(smile)), resource);
	}

	public static boolean addSmiles(Context context, Spannable spannable,
			boolean replaceSmileys, int pixels) {
		boolean hasChanges = false;
		Resources res = context.getResources();	
		if (replaceSmileys) {
			for (Entry<Pattern, Integer> entry : emoticonStrings.entrySet()) {
				Matcher matcher = entry.getKey().matcher(spannable);
				while (matcher.find()) {
					boolean set = true;
					for (ImageSpan span : spannable.getSpans(matcher.start(),
							matcher.end(), ImageSpan.class))
						if (spannable.getSpanStart(span) >= matcher.start()
								&& spannable.getSpanEnd(span) <= matcher.end())
							spannable.removeSpan(span);
						else {
							set = false;
							break;
						}
					if (set) {
						hasChanges = true;
						Bitmap smiley = BitmapFactory.decodeResource(res,
								entry.getValue());
						smiley = Bitmap.createScaledBitmap(smiley, pixels,
								pixels, false);
						ImageSpan is = new ImageSpan(context, smiley);

						spannable.setSpan(is, matcher.start(), matcher.end(),
								Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
					}
				}
			}
		}

		int len = spannable.length();
		String s = spannable.toString();
		for (int i = 0; i < len; i++) {

			int codePoint = s.codePointAt(i);
			int resourceId = getResourceId(codePoint);
			if (resourceId == 0)
				continue;
			hasChanges = true;
			Bitmap smiley = BitmapFactory.decodeResource(res, resourceId);
			smiley = Bitmap.createScaledBitmap(smiley, pixels, pixels, false);
			ImageSpan is = new ImageSpan(context, smiley);

			spannable.setSpan(is, i, i + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
			i++;

		}
		return hasChanges;
	}

	public static Spannable getSmiledText(Context context, CharSequence text,
			boolean replaceSmileys, int pixels) {
		if (text == null)
			return null;
		if (text.length() == 0)
			return null;
		Spannable spannable = spannableFactory.newSpannable(text);
		addSmiles(context, spannable, replaceSmileys, pixels);
		return spannable;
	}

}
